public class test {
    public static void main(String[] args) {
        double tmp = 0;
        double sum = 0;
        for(int i = 1;i <= 100;i++) {
            tmp = 1.0 / i * Math.pow(-1,i + 1);
            sum += tmp;
        }
        System.out.println(sum);
    }
}
